<template>
    <div class="app-container">
        <el-form ref="form" :model="form" label-width="120px">
            <el-form-item label="test form">
                <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="test zone">
                <el-select placeholder="please choose your item" v-model="form.zone">
                    <el-option label="kjc" value="shanghai"></el-option>
                    <el-option label="zzx" value="beijing"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="test time">
                <el-col :span="11">
                    <el-date-picker type="date" placeholder="pick a date" style="width:100%" v-model="form.date1"></el-date-picker>
                </el-col>
                <el-col :span="2">-</el-col>
                <el-col :span="11">
                    <el-date-picker type="fixed-time" placeholder="pick a date" style="width:100%" v-model="form.date2"></el-date-picker>
                </el-col>
            </el-form-item>
            <el-form-item label="test switch">
                <el-switch v-model="form.delivery"></el-switch>
            </el-form-item>
            <el-form-item label="test type">
                <el-checkbox-group v-model="form.type">
                    <el-checkbox label="kjc" name="type"></el-checkbox>
                    <el-checkbox label="zzx" name="type"></el-checkbox>
                    <el-checkbox label="kdl" name="type"></el-checkbox>
                    <el-checkbox label="xxx" name="type"></el-checkbox>
                </el-checkbox-group>
            </el-form-item>
            <el-form-item label="test resources">
                <el-radio-group v-model="form.resources">
                    <el-radio label="是"></el-radio>
                    <el-radio label="否"></el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="描述">
                <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">create</el-button>
                <el-button  @click="onCancel">cancel</el-button>
            </el-form-item>
            
        </el-form>
        
    </div>
</template>
<script>
export default {
    data(){
        return {
            form:{
                name:'',
                zone:'',
                date1:'',
                date2:'',
                type:[],
                resources:'',
                desc:''
            }
        }
    },
    methods: {
        onSubmit() {
            this.$message('submit')
        },
        onCancel() {
            this.$message({
                message: 'cancel!',
                type: 'warning'
            })
        }
    }
}
</script>

<style>
.line{
  text-align: center;
}
</style>

